package com.cloudatum.utils;

/**
 * redis的key值常量，key后边跟CURRENT_MIAOSHA区分秒杀
 * Created by zhoujian on 2015/10/28.
 */
public interface Constants {

    // -10000为不限制人数
    long UN_LIMIT_PEOPLE = -10000;

    /**
     * 秒杀活动的key
     * 第一次获得秒杀活动列表时，放到redis
     */
    String CURRENT_MIAOSHA = "currentMiao";


    /**
     *当前正在被秒杀的商品 字段key
     */
    String CURRENT_GOODS_ID = "goodsId";

    String CURRENT_GOODS_NAME = "goodsName";

    String CURRENT_GOODS_IMG = "goodsImg";

    String CURRENT_REAL_PRICE = "realPrice";

    String CURRENT_ACTIVITY_PRICE = "activityPrice";

    String CURRENT_GOODS_STOCK = "stock";

    String CURRENT_GOODS_REALSTOCK = "realStock";

    /**
     * 秒杀活动的id
     */
    String CURRENT_MIAOSHA_ID = "currentMiaoId";

    /**
     * 将要秒杀的开始时间
     * 第一次获得秒杀活动列表时，放到redis
     */
    String BEGIN_TIME = "beginTime";

    String END_TIME = "endTime";

    /**
     * 限制进入人数，放入redis同上
     * 作为redis key值，后跟 CURRENT_MIAOSHA
     */
    String PEOPLE_LIMIT = "peopleLimit";

    /**
     * 验证码与sessiond绑定的key值
     * key值与sessionId绑定 VERIFICATION_CODE+sessionId
     */
    String VERIFICATION_CODE = "verificationCode";

    /**
     * 归属地限制规则
     */
    String REGION_LIMIT = "regionLimitRule";

    /**
     * 存储已经购买过的手机号的set
     */
    String PHONE_HAS_BOUGHT = "phoneHasBought";

    /**
     * index/current访问量
     */
    String COUNT_INDEX_CURRENT = "countIndexCurrent";

    /**
     * order/inOrder总量
     */
    String COUNT_INORDER_ALL = "countOrderInorderAll";

    /**
     * 验证码实体key 后跟数据库验证码id区分
     */
    String VERIFICATION_ENTITY = "verificationMap";

    /**
     * 存放所有验证码实体 id的set，用于随机获取
     */
    String VERIFICATION_ENTITYID_SET = "verificationSet";

    /**
     * 验证码map成员的key值
     */
    String VERIFICATION_ANSWER = "verificationAnswer";

    String VERIFICATION_IMG = "verificationImg";

}
